package com.wing.order.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.enterprise.product.model.response.ProductPackLabelVO;
import com.wing.order.model.entity.InventoryInout;
import com.wing.order.model.request.InventoryInoutForm;
import com.wing.order.model.response.InventoryInoutVO;
import com.wing.order.model.response.InventoryJobLabelVO;
import com.wing.product.model.entity.ProductDetail;
import com.wing.product.model.response.ProductDetailVO;

import java.util.List;
import java.util.Map;

/**
 * 入库单-Service
 *
 * @author
 */
public interface InventoryInoutService extends IService<InventoryInout> {

    /**
     * 添加
     *
     * @param inventoryInoutForm
     * @return
     */
    void add(InventoryInoutForm inventoryInoutForm);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<InventoryInoutVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<InventoryInoutVO> pageList4app(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    InventoryInoutVO get4appById(Long id);

    IPage<InventoryInout> getInventoryInoutPageList(InventoryInout inventoryInout,Integer page,Integer limit);

    /**
     * 查询所有的入库计划
     * @param page
     * @param limit
     * @param code
     * @return
     */
    IPage<InventoryInoutVO> getInventoryAllPageList(Integer page,Integer limit,String code);

    /**
     * 入库签收
     * @param signList
     */
    void packLabelSign(List<ProductPackLabelVO> signList);

    /**
     * 查询入库计划签收的产品信息
     */
    List<InventoryJobLabelVO> getInventorySignProduct(Long planId);

    /**
     * 查询入库签收产品的包装条码
     * @param jobProductId
     * @return
     */
    List<InventoryJobLabelVO> getInventorySignPackLabel(Long jobProductId);

    /**
     * 查询所有入库计划
     * @return
     */
    List<InventoryInout> getStoragePlanAll();

    /**
     * 查询入库计划详情
     * @return
     */
    InventoryInoutVO getInventoryInoutVOInfo(Long planId);

    /**
     * 查询在库产品
     * @return
     */
    Map findProduct(String skuCode);
    /**
     * 查询在库产品在的所有仓库id
     * @return
     */
    List<Long> findWarehouseId(String skuCode);

    /**
     * 查询在库产品在的仓库的详情
     * @return
     */
    List<Map> findWarehouseInforById(Long id,String skuCode);

    Long queryProductStockNum(String skuCode);

    List<Map> queryProductBoxList(String skuCode, Long id);

    IPage<ProductDetailVO> getInventoryProductDetailPageList(Integer page, Integer limit);


    IPage<ProductDetailVO> getProductList(Page<ProductDetailVO> pg, Map params);
}
